<?php
Doo::loadCore('db/DooModel');

class SbEventBase extends DooModel{

    /**
     * @var int Max length is 11.
     */
    public $EVENT_ID;

    /**
     * @var varchar Max length is 120.
     */
    public $EVENT_TITLE;

    /**
     * @var text
     */
    public $EVENT_CONTENT;

    /**
     * @var varchar Max length is 120.
     */
    public $EVENT_IMG;

    /**
     * @var date
     */
    public $EVENT_TIME;

    /**
     * @var varchar Max length is 5.
     */
    public $EVENT_HOUR;

    public $_table = 'sb_event';
    public $_primarykey = 'EVENT_ID';
    public $_fields = array('EVENT_ID','EVENT_TITLE','EVENT_CONTENT','EVENT_IMG','EVENT_TIME','EVENT_HOUR');

    public function getVRules() {
        return array(
                'EVENT_ID' => array(
                        array( 'integer' ),
                        array( 'maxlength', 11 ),
                        array( 'optional' ),
                ),

                'EVENT_TITLE' => array(
                        array( 'maxlength', 120 ),
                        array( 'notnull' ),
                ),

                'EVENT_CONTENT' => array(
                        array( 'notnull' ),
                ),

                'EVENT_IMG' => array(
                        array( 'maxlength', 120 ),
                        array( 'notnull' ),
                ),

                'EVENT_TIME' => array(
                        array( 'date' ),
                        array( 'notnull' ),
                ),

                'EVENT_HOUR' => array(
                        array( 'maxlength', 5 ),
                        array( 'notnull' ),
                )
            );
    }

}